/**
 * 2016，thor.com，all rights reserved。
 * 
 * Project：		palmmall-core
 * Filename：	SPasswordInfoConverter.java
 * Created：		2016年7月30日
 * Creator：		wolv
 */
package com.thor.palmmall.rest.todo.converter;

import org.springframework.core.convert.converter.Converter;

import com.thor.palmmall.rest.todo.ATaskQueryParam;
import com.thor.palmmall.spi.todo.STaskQueryParam;

/**
 * @author wolv
 *
 */
public class STaskQueryParamConverter implements Converter<ATaskQueryParam, STaskQueryParam> {

  public static STaskQueryParamConverter getInstance() {
    if (instance == null)
      instance = new STaskQueryParamConverter();
    return instance;
  }

  private static STaskQueryParamConverter instance;

  private STaskQueryParamConverter() {
  }

  @Override
  public STaskQueryParam convert(ATaskQueryParam source) {
    if (source == null)
      return null;

    STaskQueryParam target = new STaskQueryParam();
    target.setTaskType(source.getTaskType());
    target.setUserId(source.getUserId());
    target.setPage(source.getPage());
    target.setPageSize(source.getPageSize());
    target.setBillType(source.getBillType());
    target.setTaskTitleLike(source.getTaskTitleLike());

    return target;
  }

}
